/**
 * Created by baidm in 2022/4/10 on 10:25
 */

class Animal {
  name: string

  constructor(name) {
    this.name = name
  }

  run() {
    return `${this.name} is running`
  }
}

const snake = new Animal("lili")
console.log(snake.run())

class Dog extends Animal {
  bark() {
    return `${this.name} is barking`
  }
}

const dog = new Dog("xiaobao")
console.log(dog.run())
console.log(dog.bark())



